package thread;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/4/27
 * Time:19:10
 * run和start区别
 **/
public class ThreadDemo10 {
    static class MyThread extends Thread {
        @Override
        public void run() {
            System.out.println("线程名" + Thread.currentThread().getName());
        }
    }

    public static void main(String[] args) {
        MyThread thread = new MyThread();
        thread.setName("张三");
        thread.start();
        thread.start();
        //thread.run();
        //thread.run();
    }
}
